package net.hvacapp.cmvrfforandroid.ui.selections.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by zhangnorman on 15/7/12.
 */
public class AreaData implements Parcelable {
    private String GuidId;
    private String Name;
    private String NationId;
    private String ProvinceId;
    private double ColdLoadFactor;
    private double HeatLoadFactor;
    private int isSelected;



    public String getGuidId() {
        return GuidId;
    }

    public void setGuidId(String guidId) {
        GuidId = guidId;
    }

    public String getName() {
        return Name;
    }

    public void setName(String name) {
        Name = name;
    }

    public String getNationId() {
        return NationId;
    }

    public void setNationId(String nationId) {
        NationId = nationId;
    }

    public String getProvinceId() {
        return ProvinceId;
    }

    public void setProvinceId(String provinceId) {
        ProvinceId = provinceId;
    }

    public double getColdLoadFactor() {
        return ColdLoadFactor;
    }

    public void setColdLoadFactor(double coldLoadFactor) {
        ColdLoadFactor = coldLoadFactor;
    }

    public double getHeatLoadFactor() {
        return HeatLoadFactor;
    }

    public void setHeatLoadFactor(double heatLoadFactor) {
        HeatLoadFactor = heatLoadFactor;
    }

    public int isSelected() {
        return isSelected;
    }

    public void setIsSelected(int isSelected) {
        this.isSelected = isSelected;
    }

    /**
     * Describe the kinds of special objects contained in this Parcelable's
     * marshalled representation.
     *
     * @return a bitmask indicating the set of special object types marshalled
     * by the Parcelable.
     */
    @Override
    public int describeContents() {
        return 0;
    }

    /**
     * Flatten this object in to a Parcel.
     *
     * @param dest  The Parcel in which the object should be written.
     * @param flags Additional flags about how the object should be written.
     *              May be 0 or {@link #PARCELABLE_WRITE_RETURN_VALUE}.
     */
    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(GuidId);
        dest.writeString(Name);
        dest.writeString(NationId);
        dest.writeString(ProvinceId);
        dest.writeDouble(ColdLoadFactor);
        dest.writeDouble(HeatLoadFactor);
        dest.writeInt(isSelected);
    }

    /**
     * 序列化实体类
     */
    public static final Creator<AreaData> CREATOR = new Creator<AreaData>() {
        public AreaData createFromParcel(Parcel source) {
            AreaData areaData = new AreaData();
            areaData.GuidId = source.readString();
            areaData.Name = source.readString();
            areaData.NationId = source.readString();
            areaData.ProvinceId = source.readString();
            areaData.ColdLoadFactor = source.readDouble();
            areaData.HeatLoadFactor = source.readDouble();
            areaData.isSelected = source.readInt();

            return areaData;
        }

        public AreaData[] newArray(int size) {
            return new AreaData[size];
        }
    };

}
